<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=<div>, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">

    </div>
</body>
<script src="https://unpkg.com/vue@next"></script>
<script>
    const {ref,onBeforeMount,onUpdate,onBeforeUpdate,onMounted } = Vue;
    const app = Vue.createApp({
        template:`
        <div @click=count++>计数{{count}}</div>
        `,
        setup(props) {
        const count = ref(0);
            onBeforeMount(() => {
                console.log('---------onBeforeMount----------');
            })
            onMounted(() => {
                console.log('---------onMounted----------');
            })
            onBeforeUpdate(() => {
                console.log('---------onBeforeUpdate----------');
            })
            onUpdate(() => {
                console.log('---------onUpdate----------');
            })

            
        return {count};
    }
        

    })

    const Vm = app.mount("#app")
</script>

</html>